<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-08-05 11:16:13
 * @LastEditors: charles
 * @LastEditTime: 2021-08-05 16:50:50
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>echarts</title>
  <!-- 1. 引入组件库 -->
  <script src="../echarts.min.js"></script>
</head>
<body>
  <!-- 2. 创建一个容器用于容纳图表 
    了解g2plot/echarts/hightchart图表库 -->
  <div id="container" style="height: 400px;"></div>
  <!-- 3. 创建g2Plot的实例对象，渲染 -->
  <script>
    // 3.1 创建柱状图对象
    let chart = echarts.init(document.getElementById('container'))
    chart.setOption({
      title: {
          text: 'ECharts 入门示例'
      },
      tooltip: {},
      legend: {
          data:['销量']
      },
      xAxis: {
          data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
      },
      yAxis: {},
      series: [{
          name: '销量',
          type: 'bar',
          data: [5, 20, 36, 10, 10, 20]
      }]
    })

  </script>
</body>
</html>